<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

    <ui:define name="l_content">
		<ui:include src="/l_content/lc.xhtml" />
    </ui:define>
    
    <ui:define name="body">
    	<h:form>
	    	<table>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.k_name_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.username}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.k_password_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputSecret value="#{kRegistration.password}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.confirm_password_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputSecret value="#{kRegistration.confirmPassword}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.email_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.email}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.nickname_msg}" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.nickname}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.firstname_msg}" required="true"/>
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.firstname}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.lastname_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.lastname}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.address_msg}" />
	    			</td>
	    			<td>
	    				<h:inputTextarea value="#{kRegistration.address}" >
	    					<f:validateLength maximum="255" />
	    				</h:inputTextarea>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.tel_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.tel}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.mob_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:inputText value="#{kRegistration.mob}" required="true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.birthday_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<rich:calendar value="#{kRegistration.birthday}" required="true" showWeeksBar="false" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.gender_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:selectOneMenu value="#{kRegistration.gender}" required="true" >
	    					<s:selectItems value="#{kUtilProvider.getGenders()}" var="g" label="#{g.message}" />
	    					<s:convertEnum />
	    				</h:selectOneMenu>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.language_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:selectOneMenu value="#{kRegistration.lang}" required="true" >
	    					<s:selectItems value="#{kUtilProvider.langs()}" var="l" label="#{l.message}" />
	    					<s:convertEnum />
	    				</h:selectOneMenu>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.newsletter_msg}" />
	    			</td>
	    			<td>
	    				<h:selectBooleanCheckbox value="#{kRegistration.newsletter}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.desc_msg}" />
	    			</td>
	    			<td>
	    				<h:inputTextarea value="#{kRegistration.desc}" rows="10" cols="50" >
	    					<f:validateLength maximum="1000" />
	    				</h:inputTextarea>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.name_visible_msg}" />
	    			</td>
	    			<td>
	    				<h:selectBooleanCheckbox value="#{kRegistration.nameVisible}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.email_visible_msg}" />
	    			</td>
	    			<td>
	    				<h:selectBooleanCheckbox value="#{kRegistration.emailVisible}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.birthday_visible_msg}" />
	    			</td>
	    			<td>
	    				<h:selectBooleanCheckbox value="#{kRegistration.birthdayVisible}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.tel_visible_msg}" />
	    			</td>
	    			<td>
	    				<h:selectBooleanCheckbox value="#{kRegistration.telVisible}" />
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>
	    				<h:outputText value="#{messages.accept_terms_msg}" />
	    				<h:outputText value="*" styleClass="m" />
	    			</td>
	    			<td>
	    				<h:selectBooleanCheckbox value="#{kRegistration.acceptTerms}" required="true"/>
	    				&#160;
	    				<a href="#{facesContext.externalContext.requestContextPath}/k_terms.k" target="blank_">
	    					<img src="#{facesContext.externalContext.requestContextPath}/img/information-frame.png" alt="info" title="#{messages.terms_of_use_msg}"/>
	    				</a>
	    			</td>
	    		</tr>
	   		</table>
	   		<br />
	   		<table>
	    		<tr>
	    			<td>
	    				<h:commandButton action="#{kRegistration.save()}" value="#{messages.register_msg}"/>
	    			</td>
	    		</tr>
	    	</table>
    	</h:form>
    </ui:define>
</ui:composition>
